﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace WaterRevenueMS.Domain.ViewModels.BasicSet.BankCode
{
    public class BankCodeModel : EntityCommon
    {
        public BankCodeModel()
        {
            Search = new SearchModel();
            {

            };
        }
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        [Remote("IdUnique_Available", "BankCode", ErrorMessage = "该名称已经存在")]
        public int Id { get; set; }


        [Display(Name = "银行名称")]
        [Required(ErrorMessage = "银行名称不能为空")]
        [StringLength(50, MinimumLength = 2, ErrorMessage = "银行名称{2}～{1}个字符")]
        [Remote("IsUnique_Available", "BankCode", ErrorMessage = "该名称已经存在")]
        public string Yin_HMC { get; set; }

        [Display(Name = "银行简称")]
        public string Yin_HJC { get; set; }

        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }

        public SearchModel Search { get; set; }
    }
    public class SearchModel
    {
        public SearchModel()
        {
           
        }

        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }

        [Display(Name = "银行名称")]
        public string Yin_HMC { get; set; }


        [Display(Name = "银行简称")]
        public string Yin_HJC { get; set; }

        public int id { get; set; }

    }
}
